home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / complib.idb / usr / share / catman / p_man / cat3 / complib / zdrot.z / zdrot
Text File  |  1996-03-14  |  2KB  |  133 lines

  1.  
  2.  
  3.  
  4. ZZZZDDDDRRRROOOOTTTT((((3333FFFF))))                                                            ZZZZDDDDRRRROOOOTTTT((((3333FFFF))))
  5.  
  6.  
  7.  
  8. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  9.      SUBROUTINE ZDROT( N, CX, INCX, CY, INCY, C, S )
  10.  
  11.          INTEGER       INCX, INCY, N
  12.  
  13.          DOUBLE        PRECISION C, S
  14.  
  15.          COMPLEX*16    CX( * ), CY( * )
  16.  
  17.          INTEGER       I, IX, IY
  18.  
  19.          COMPLEX*16    CTEMP
  20.  
  21.          IF(           N.LE.0 ) RETURN
  22.  
  23.          IF(           INCX.EQ.1 .AND. INCY.EQ.1 ) GO TO 20
  24.  
  25.          IX            = 1
  26.  
  27.          IY            = 1
  28.  
  29.          IF(           INCX.LT.0 ) IX = ( -N+1 )*INCX + 1
  30.  
  31.          IF(           INCY.LT.0 ) IY = ( -N+1 )*INCY + 1
  32.  
  33.          DO            10 I = 1, N
  34.  
  35.          CTEMP         = C*CX( IX ) + S*CY( IY )
  36.  
  37.          CY(           IY ) = C*CY( IY ) - S*CX( IX )
  38.  
  39.          CX(           IX ) = CTEMP
  40.  
  41.          IX            = IX + INCX
  42.  
  43.          IY            = IY + INCY
  44.  
  45.          10            CONTINUE
  46.  
  47.          RETURN
  48.  
  49.          20            CONTINUE
  50.  
  51.          DO            30 I = 1, N
  52.  
  53.          CTEMP         = C*CX( I ) + S*CY( I )
  54.  
  55.          CY(           I ) = C*CY( I ) - S*CX( I )
  56.  
  57.          CX(           I ) = CTEMP
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ZZZZDDDDRRRROOOOTTTT((((3333FFFF))))                                                            ZZZZDDDDRRRROOOOTTTT((((3333FFFF))))
  71.  
  72.  
  73.  
  74.          30            CONTINUE
  75.  
  76.          RETURN
  77.  
  78.          END
  79.  
  80. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                                                         PPPPaaaaggggeeee 2222
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.